package com.escope.casemanager.service.impl;

import com.escope.casemanager.dao.SysParamDao;
import com.escope.casemanager.dao.SysParamTypeDao;
import com.escope.casemanager.model.SysParam;
import com.escope.casemanager.model.SysParamType;
import com.escope.casemanager.service.SysParamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Administrator
 * 2024/3/15
 */
@Transactional(rollbackFor = Exception.class)
@Service("sysParamService")
public class SysParamServiceImpl implements SysParamService {

    @Autowired
    private SysParamDao sysParamDao;

    @Autowired
    private SysParamTypeDao sysParamTypeDao;


    @Override
    public List<SysParamType> findParamTypeAll() {
        return sysParamTypeDao.findAll();
    }

    @Override
    public List<SysParam> findParamByTypeCode(String typeCode) {
        return sysParamDao.findByTypeCode(typeCode);
    }
}
